<template>
	<div id="no-auth-view">
		<a-result status="403" title="403" sub-title="抱歉，您没有权限访问此页面">
			<template #extra>
				<a-space>
					<a-button type="primary" @click="goBack">返回上一页</a-button>
					<a-button @click="goHome">回到首页</a-button>
				</a-space>
			</template>
		</a-result>
	</div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

// 返回上一页
const goBack = () => {
	router.go(-1)
}

// 回到首页
const goHome = () => {
	router.push('/')
}
</script>

<style scoped lang="scss">
#no-auth-view {
	display: flex;
	align-items: center;
	justify-content: center;
}
</style>
